home *** CD-ROM | disk | FTP | other *** search
/ Aminet 7 / Aminet 7 - August 1995.iso / Aminet / dev / asm / 4PlayerAdapter.lha / 4PlayerAdapter.txt
Text File  |  1995-05-03  |  2KB  |  101 lines

  1.  
  2. Assembler-routine on how to check a 4-player-adapter
  3. (this was written on the fly but should work)
  4.  
  5. JoyTest3        clr.l   Right3
  6.                 clr.b   Fire3
  7.                 btst    #2,$bfd000
  8.                 bne.s   NoFire3
  9.                 move.w  #-1,Fire3
  10. NoFire3         move.b  $bfe101,d0
  11.                 btst    #3,d0
  12.                 bne.s   NoRight3
  13.                 move.b  #-1,Right3
  14. NoRight3        btst    #2,d0
  15.                 bne.s   NoLeft3
  16.                 move.b  #-1,Left3
  17. NoLeft3         btst    #1,d0
  18.                 bne.s   NoDown3
  19.                 move.b  #-1,Down3
  20. NoDown3         btst    #0,d0
  21.                 bne.s   NoUp3
  22.                 move.b  #-1,Up3
  23. NoUp3           rts
  24.  
  25. Right3          dc.b    0
  26. Left3           dc.b    0
  27. Down3           dc.b    0
  28. Up3             dc.b    0
  29. Fire3           dc.b    0
  30.                 even
  31.  
  32. JoyTest4        clr.l   Right4
  33.                 clr.b   Fire3
  34.                 btst    #0,$bfd000
  35.                 bne.s   NoFire4
  36.                 move.w  #-1,Fire4
  37. NoFire4         move.b  $bfe101,d0
  38.                 btst    #7,d0
  39.                 bne.s   NoRight4
  40.                 move.b  #-1,Right4
  41. NoRight4        btst    #6,d0
  42.                 bne.s   NoLeft4
  43.                 move.b  #-1,Left4
  44. NoLeft4         btst    #5,d0
  45.                 bne.s   NoDown4
  46.                 move.b  #-1,Down4
  47. NoDown4         btst    #4,d0
  48.                 bne.s   NoUp4
  49.                 move.b  #-1,Up4
  50. NoUp4           rts
  51.  
  52. Right4          dc.b    0
  53. Left4           dc.b    0
  54. Down4           dc.b    0
  55. Up4             dc.b    0
  56. Fire4           dc.b    0
  57.                 even
  58.  
  59.  
  60. How to build a 4-player adapter for MasterBlaster etc... :
  61.  
  62. Joystick #3                parallel Port
  63. -----------                -------------
  64.  
  65.    pin 1          ->          pin 6
  66.  
  67.    pin 2          ->          pin 7
  68.  
  69.    pin 3          ->          pin 8
  70.  
  71.    pin 4          ->          pin 9
  72.  
  73.    pin 5                        -
  74.  
  75.    pin 6          ->          pin 13
  76.  
  77.    pin 7          ->          +5 V
  78.  
  79.    pin 8          ->          GND
  80.  
  81.  
  82. Joystick #4                parallel Port
  83. -----------                -------------
  84.  
  85.    pin 1          ->          pin 2
  86.  
  87.    pin 2          ->          pin 3
  88.  
  89.    pin 3          ->          pin 4
  90.  
  91.    pin 4          ->          pin 5
  92.  
  93.    pin 5                        -
  94.  
  95.    pin 6          ->          pin 11/12
  96.  
  97.    pin 7          ->          +5 V
  98.  
  99.    pin 8          ->          GND
  100.  
  101.